<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.sql.*" %>
<%@ include file="connstring.jsp"%>
<%
String strId = request.getParameter("id");
if(strId==null) strId="0";
	Connection conn = null;
	Statement stmt = null;
	
try{
	Class.forName(driver);
	conn = DriverManager.getConnection(url);
	stmt = conn.createStatement();
	String sql = "delete from user where id="+strId;
	stmt.executeUpdate(sql);
	response.sendRedirect("userlist.jsp");
	
	
}catch(Exception ex){
	out.println("错误"+ex.getMessage());

}finally{;
 if(stmt!=null)stmt.close();
 if(conn!=null) conn.close();
}
%>